<?
require_once("../config/dbconn.php");require_once("../config/powercls.php");

if($act=='sysset'){
	//插入数据库
	unset($dataArray);
	$dataArray['bdbs']=$bdbs;
	$dataArray['nbbs']=$nbbs;
	$dataArray['closetx']=$closetx;
	$dataArray['tixianlower1']=$tixianlower1;
	$dataArray['tixianrate']=$tixianrate;
	$dataArray['tixianlower']=$tixianlower;
	$dataArray['closejjtobd']=$closejjtobd;
	$dataArray['jjtransrate']=$jjtransrate;
	$dataArray['zztransrate']=$zztransrate;
	$dataArray["jjzdzblower"]=$_POST["jjzdzblower"];
	$dataArray["dzbzyxblower"]=$_POST["dzbzyxblower"];
	$dataArray["closebdtobd"]=$_POST["closebdtobd"];
	$dataArray["dzbtransrate"]=$_POST["dzbtransrate"];
	$dataArray['hyupljpv']=$hyupljpv;
	$dataArray['hyupkbdprice']=$hyupkbdprice;
	$dataArray['hyupneedsh']=$hyupneedsh;
	$dataArray['zmdsqkbdprice']=$zmdsqkbdprice;
	$dataArray['autohybh']=$autohybh;
	$dataArray['autohypre']=$autohypre;
	foreach($zmdrankary as $k1=>$v1){
		$dataArray["zmdregprice_{$k1}"]=$_POST["zmdregprice_{$k1}"];
		$dataArray["zmdzhekou_{$k1}"]=$_POST["zmdzhekou_{$k1}"];
	}
	foreach($hyrankary as $k1=>$v1){
		$dataArray["zhekou_{$k1}"]=$_POST["zhekou_{$k1}"];
	}
	$condition="id=1";
	$db->update("{$db_prefix}systemset",$dataArray,$condition);
	echo "<script>alert('系统设定成功');location.href='system_set.php';</script>";exit();	
}
$sql="select * from {$db_prefix}systemset where 1";
$rs=$db->get_one($sql);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	
}
-->
</style>

<link href="images/skin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="29" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td width="935" height="29" valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">系统设定</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="71" valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"><table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="13" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td valign="top">
		<form id="form1" name="form1" method="post" action="?act=sysset">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td colspan="3"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="nowtable">
                <tr>
                  <td class="left_bt2">&nbsp;&nbsp;&nbsp;&nbsp;</td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td height="30" colspan="3">
			  
			  <table width="100%" height="540" border="0" cellpadding="0" cellspacing="0">
              	<tr>
                  <td height="30" align="center" class="left_txt">关闭提现</td>
                  <td height="30" class="left_txt"><label>
                    <input name="closetx" type="checkbox" id="closetx" value="1" <? if ($rs['closetx']==1) echo " checked"?>>
                    
                  打钩关闭</label></td>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">提现最低金额</td>
                  <td height="30" class="left_txt"><input name="tixianlower1" type="text" id="tixianlower1" value="<?=$rs['tixianlower1']?>">
                    人民币</td>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">提现倍数</td>
                  <td height="30" class="left_txt"><input name="tixianlower" type="text" id="tixianlower" value="<?=$rs['tixianlower']?>">
                    人民币</td>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">提现费率</td>
                  <td height="30" class="left_txt"><label>
                    <input name="tixianrate" type="text" id="tixianrate" value="<?=$rs['tixianrate']?>">
                  %</label></td>
                </tr>
                <tr><td colspan="2"><hr></td></tr>
                 <tr>
                  <td height="30" align="center" class="left_txt">关闭奖金币转出（会员奖金币转报单币或购物券） </td>
                  <td height="30" class="left_txt"><label>
                    <input name="closejjtobd" type="checkbox" id="closejjtobd" value="1" <? if ($rs['closejjtobd']==1) echo " checked"?>>
                    
                  打钩关闭</label></td>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">奖金币转出费率</td>
                  <td height="30" class="left_txt"><input name="jjtransrate" type="text" id="jjtransrate" value="<?=$rs['jjtransrate']?>">
%</td>
				 </tr>
                 <tr>
                
                   <td height="30" align="center"  class="left_txt">奖金转出最少</td>
                   <td height="30" class="left_txt">     <input name="jjzdzblower" type="text" id="jjzdzblower" value="<?=$rs["jjzdzblower"]?>" size="10">
                     $起。</td>
                 </tr>
<tr >
				  <td height="30" align="center"  class="left_txt">奖金币转出倍率 </td>
				  <td height="30" class="left_txt">   <input name="bdbs" type="text" id="dzbzyxblower" value="<?=$rs["bdbs"]?>" size="10">$起。    </td>
				  </tr>
               <tr>
               
               <tr><td colspan="2"><hr></td></tr>                
                 <!--  <td height="30" align="center" class="left_txt">报单币转报单币费率</td>
                  <td height="30" class="left_txt"><input name="dzbtransrate" type="text" id="dzbtransrate" value="<?=$rs['dzbtransrate']?>">
%</td>
                </tr>-->
                <tr>
                  <td height="30" align="center" class="left_txt">关闭内部转账</td>
                  <td height="30" class="left_txt"><label>
                    <input name="closebdtobd" type="checkbox" id="closebdtobd" value="1" <? if ($rs['closebdtobd']==1) echo " checked"?>>
                    
                  打钩关闭</label></td>
                </tr>
                <tr >
				  <td height="30" align="center"  class="left_txt">内部转账最少 </td>
				  <td height="30" class="left_txt">   <input name="dzbzyxblower" type="text" id="dzbzyxblower" value="<?=$rs["dzbzyxblower"]?>" size="10">$起。    </td>
				  </tr>
				
               
                 <tr>
                  <td height="30" align="center" class="left_txt">内部转账倍数</td>
                  <td height="30" class="left_txt"><input name="nbbs" type="text" id="nbbs" value="<?=$rs['nbbs']?>">
%</td>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">内部转账费率</td>
                  <td height="30" class="left_txt"><input name="zztransrate" type="text" id="zztransrate" value="<?=$rs['zztransrate']?>">
%</td>
                </tr>
                
                <!--<tr>
                  <td height="30" align="center" class="left_txt">升级累计业绩</td>
                  <td height="30" class="left_txt">
                    <input name="hyupljpv" type="checkbox" id="hyupljpv" value="1" <? if ($rs['hyupljpv']==1) echo " checked"?>>                 </td>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">升级扣除报单币</td>
                  <td height="30" class="left_txt"><label>
                    <input name="hyupkbdprice" type="checkbox" id="hyupkbdprice" value="1" <? if ($rs['hyupkbdprice']==1) echo " checked"?>>
                  </label></td>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">升级是否需要审核</td>
                  <td height="30" class="left_txt"><label>
                    <input name="hyupneedsh" type="checkbox" id="hyupneedsh" value="1" <? if ($rs['hyupneedsh']==1) echo " checked"?>>
                  </label></td>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">专卖店申请是否扣除报单币</td>
                  <td height="30" class="left_txt"><label>
                    <input name="zmdsqkbdprice" type="checkbox" id="zmdsqkbdprice" value="1" <? if ($rs['zmdsqkbdprice']==1) echo " checked"?>>
                  </label></td>
                </tr>-->
                <tr>
                  <td height="30" align="center" class="left_txt">自动生成会员编号</td>
                  <td height="30" class="left_txt"><label>
                    <input name="autohybh" type="checkbox" id="autohybh" value="1" <? if ($rs['autohybh']==1) echo " checked"?>>
                    前缀
                    <input name="autohypre" type="text" id="autohypre" size="10" value="<?=$rs['autohypre']?>">
                  </label></td>
                </tr>
                
                <!--<tr>
                  <td height="30" align="center" class="left_txt">会员级别</td>
				  <?
				  foreach($hyrankary as $k1=>$v1){
				  ?>
                  <td height="30" class="left_txt"><?=$v1?></td>
				  <?
				  }
				  ?>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">购物折扣</td>
				  <?
				  foreach($hyrankary as $k1=>$v1){
				  ?>
                  <td height="30" class="left_txt"><input name="zhekou_<?=$k1?>" type="text" size=5 value="<?=$rs["zhekou_{$k1}"]?>">
                    折
					<?
				  }
				  ?></td>
                </tr>
                <tr>
                  <td height="30" align="center" class="left_txt">专卖店级别</td>
				  <?
				  foreach($zmdrankary as $k1=>$v1){
				  ?>
                  <td height="30" class="left_txt"><label>
                    <?=$v1?>
                  </label></td>
				  <?
				  }
				  ?>
                </tr>
				 <tr>
                  <td height="30" align="center" class="left_txt">所需金额</td>
				  <?
				  foreach($zmdrankary as $k1=>$v1){
				  ?>
                  <td height="30" class="left_txt"><label>
                    <input name="zmdregprice_<?=$k1?>" type="text" size=5 value="<?=$rs["zmdregprice_{$k1}"]?>">
                    人民币
                  </label></td>
				  <?
				  }
				  ?>
                </tr>
				
                 <tr>
                   <td height="30" align="center" class="left_txt">购物折扣</td>
				   <?
				  foreach($zmdrankary as $k1=>$v1){
				  ?>
                   <td height="30" class="left_txt"><input name="zmdzhekou_<?=$k1?>" type="text" size=5 value="<?=$rs["zmdzhekou_{$k1}"]?>">折</td> 		<?
				  }
				  ?>
                 </tr>
                 <tr>
                  <td height="30" align="center" class="left_txt">&nbsp;</td>
                  <td height="30" class="left_txt"><label></label></td>
                </tr>-->
              </table></td>
            </tr>
            
            <tr>
              <td height="30" colspan="3">&nbsp;</td>
            </tr>
            <tr>
              <td width="50%" height="30" align="right"><input type="submit" value="修改" name="B1" /></td>
              <td width="6%" height="30" align="right">&nbsp;</td>
              <td width="44%" height="30"><input type="reset" value="取消" name="B12" /></td>
            </tr>
            <tr>
              <td height="30" colspan="3">&nbsp;</td>
            </tr>
          </table>
		  </form>
		  </td>
      </tr>
    </table></td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
      <td height="17" valign="top" background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17" /></td>
    <td background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>

</body>
</html>
